#pragma once

#include "BasicObject.h"
#include "agent.h"
#include "role.h"
#include "typdefs.h"
#include "emotionalmemory.h"
#include "event.h"
#include "action.h"

namespace BAA
{
	class Agent;
	class Role;
	class EmotionalMemory;
	class Event;

	class Goal:public BasicObject
	{
	public:
		Goal(const std::string name):BasicObject(name)
		{

		}

		~Goal()
		{

		}

		virtual void Create(){};

		virtual void Initialize(Role * roleParent)
		{
			mRoleParent = roleParent;
		}

		Role* ParentRole() const { return mRoleParent; }
		void ParentRole(Role* val) { mRoleParent = val; }		

		

		virtual EmotionalMemory* AppraiseEvent(Event * event)=0;
		virtual float CalculateStateUtility(Agent * agent)=0;
		virtual float CalculateUtilityForAction(Action * action)=0;

		std::string Precondition() const { return mPrecondition; }
		void Precondition(std::string val) { mPrecondition = val; }

	protected:	

		Role* mRoleParent;

		std::string mPrecondition;

		StringFloatMap		mFloatGoalData;
	};// end class
}// end namespace
